package com.ieng.ormosia.connect.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 权限表
 */
@ApiModel(value = "model-Permission")
@Data
public class Permission implements Serializable {
	/**
	 * 主键
	 */
	@ApiModelProperty(value = "主键")
	private Long id;

	/**
	 * 上级ID
	 */
	@ApiModelProperty(value = "上级ID")
	private Long parentId;

	/**
	 * 权限名称
	 */
	@ApiModelProperty(value = "权限名称")
	@NotBlank(message = "权限名称不能为空")
	private String name;

	/**
	 * 权限标识
	 */
	@ApiModelProperty(value = "权限标识")
	private String permit;

	/**
	 * 权限图标
	 */
	@ApiModelProperty(value = "权限图标")
	private String icon;

	/**
	 * 权限路径
	 */
	@ApiModelProperty(value = "权限路径")
	private String path;

	/**
	 * 权限类型-#D:目录#M:菜单#X:按钮
	 */
	@ApiModelProperty(value = "权限类型-#D:目录#M:菜单#X:按钮")
	private String type;

	/**
	 * 是否外部链接-#0:本地#1:外部
	 */
	@ApiModelProperty(value = "是否外部链接-#0:本地#1:外部")
	private String isNative;

	/**
	 * 排序
	 */
	@ApiModelProperty(value = "排序")
	private Integer sort;

	/**
	 * 状态-#1:正常#0:禁用
	 */
	@ApiModelProperty(value = "状态-#1:正常#0:禁用")
	private String status;

	/**
	 * 备注
	 */
	@ApiModelProperty(value = "备注")
	private String notes;

	/**
	 * 创建者
	 */
	@ApiModelProperty(value = "创建者")
	private String createBy;

	/**
	 * 更新者
	 */
	@ApiModelProperty(value = "更新者")
	private String changeBy;

	/**
	 * 创建时间
	 */
	@ApiModelProperty(value = "创建时间")
	private LocalDateTime createTime;

	/**
	 * 更新时间
	 */
	@ApiModelProperty(value = "更新时间")
	private LocalDateTime changeTime;

	/**
	 * 逻辑删除-#0:未删除#1:删除
	 */
	@ApiModelProperty(value = "逻辑删除-#0:未删除#1:删除")
	@JsonIgnore
	private String deleted;

	private List<Permission> children;

	private static final long serialVersionUID = 1L;
}